﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mappings;

namespace Apollo
{
    [NHibernateEntity(Table = "ContractProducts")]
    public class ContractProduct : ITrackable, ILegacy, IStateable
    {
        public ContractProduct() { }

        [PrimaryKey]
        public virtual int Id { get; set; }

        [BelongsTo(Column = "ID_Contract")]
        public virtual Contract Contract { get; set; }

        [BelongsTo(Column = "ID_Product")]
        public virtual Product Product { get; set; }


        [Property]
        public virtual double GrossValue { get; set; }

        [Property]
        public virtual double InsuredValue { get; set; }

        [Property]
        public virtual double GWP { get; set; }


        [Property]
        public virtual double ExtraPremiumMedical { get; set; }

        [Property]
        public virtual double ExtraPremiumProfessional { get; set; }

        [Property]
        public virtual double ExtraPremiumOther { get; set; }



        [Property]
        public virtual int YearDuration { get; set; }


        [Property]
        public virtual double Quantity { get; set; }

        [BelongsTo(Column = "ID_Currency")]
        public virtual Currency Currency { get; set; }


        [Property]
        public virtual DateTime StartDate { get; set; }

        [Property]
        public virtual DateTime? EndDate { get; set; }

        [Property]
        public virtual State State { get; set; }

        [Property]
        public virtual string LegacyApplication { get; set; }

        [Property]
        public virtual string LegacyID { get; set; }


        [Property]
        public virtual DateTime InsertDate { get; set; }

        [Property]
        public virtual string InsertBy { get; set; }

        [Property]
        public virtual DateTime? ModifiedDate { get; set; }

        [Property]
        public virtual string ModifiedBy { get; set; }
    }
}
